This invention is directed toward apparatus and methods for updating existing computer files. More particularly, the invention is directed toward methods and apparatus for identifying only the portion of the file to be changed, forming a patch program to implement the change at the bit level, and forming a Patch Apply program to implement the desired changes in the existing file thereby forming a revised file, meaning a NEW or updated file.
The changing or xe2x80x9cupdatingxe2x80x9d of files is a normal process in computer science. Application files are routinely updated as technology advances and improvements are developed. Application files are also frequently updated to eliminate bugs that are found during usage. Data files are typically modified as new data are acquired, or old data are determined to be invalid. Files comprising text are also routinely modified for numerous reasons well known in the art.
Traditionally, changes in files have been implemented by creating a completely NEW file containing all desired changes, and distributing this full, modified file to all users to be downloaded to replace the existing file. Distribution of a completely new version of the file is costly to the provider. Reinstallation of the new version is costly to the end users. Often, the initial version of the file is lost, and cannot be retrieved for economic or technical reasons. Reinstallation is bandwidth or media intensive for the end user.
File xe2x80x9cpatchingxe2x80x9d techniques have been used in the prior art to revise existing files. The administration of these techniques is complex, and installation of the patch is often as involved technically and economically as the installation of a fully revised version of the file.
In view of the previously described methodology and prior art, an object of this invention is to provide a system to modify or patch an existing file at the bit level and only in those areas of the file requiring modification.
Another object of the invention is to provide a system for easily building a patch, and easily installing the patch.
Yet another object of the invention is to provide a system for finding the difference between an existing computer file and an updated version of the file using a fixed amount of memory, and using these differences to implement the desired update of the existing file.
Another object of the invention is to provide a patch system which works with a single file, with a group of files, with directories, and with directory trees.
Still another object of the present invention is to provide a patch system for an existing file which can be used to fix bugs, implement program changes, implement data and text revisions while providing an error checking system and a backup system which allows the user to restore the original existing file.
Yet another object of the invention is to provide a system with which multiple changes or patches can be made in an existing file with a single application of the system.
There are other objects and advantages of the present invention which will become apparent in the following disclosure.
The first step in the computer file update or patch process involves the building of a Patch File. The existing or original file, which will be referred to as the OLD file, and the revised file, which will be referred as the NEW file, are input into a Patch Build program. The differences in the OLD file and the NEW file are determined by the Patch Build program, and this information is output by the Patch Build program as a Patch File. Operation of the Patch Build program will be disclosed in detail in a subsequent section. The changes required to convert the OLD input file to the NEW input file are transferred as the Patch File.
The next step in the computer file patch involves the distribution of the Patch File, along with a Patch Apply program, to the end users so that the OLD file (wherever located) is efficiently converted to the desired, updated NEW file. The OLD file and the Patch File are input by the end user into the Patch Apply program. The Patch Apply program changes, at the bit level, only the portions of the OLD file required to yield the desired file update. The updated file is therefore output from the Patch Apply program yielding the desired NEW file at the user level.
By distributing only the Patch File and Patch Apply program to the end users, the desired file update can be implemented by the end user with maximum operational and economic efficiency. Furthermore, the update is implemented with numerous safety features including (1) automatic verification that the correct files have been used and that the patches have been built and applied correctly, (2) automatic check for sufficient disk space, (3) restart capability after power failure, (4) backup of any files affected by a patch, and (5) the ability to reverse the patched file or an entire system to the prior condition.